import request from '@/utils/request'

// 分页查询收款合同列表
export function collectMoneyList(params) {
  return request({
    url: '/basic/agreementPaymentRecord/queryPaymentAgreement',
    method: 'post',
    data: params,
  })
}

// 收款操作
export function collectMoneyOper(data) {
  return request({
    url: '/basic/agreementPaymentRecord/add',
    method: 'post',
    data: data,
  })
}

// 获取收款记录
export function collectMoneyRecord(params) {
  return request({
    url: '/basic/agreementPaymentRecord/listing',
    method: 'get',
    params: params,
  })
}

// 修改收款记录
export function collectMoneyRecordEdit(data) {
  return request({
    url: '/basic/agreementPaymentRecord/edit',
    method: 'post',
    data: data,
  })
}

// 删除收款记录
export function collectMoneyRecordDelete(paymentRecordId) {
  return request({
    url: `/basic/agreementPaymentRecord/deletePaymentRecord`,
    method: 'post',
    data: { paymentRecordId }
  })
}
